#!/bin/sh
 
NAME=$1
#echo `ps -ef | grep $NAME`
if test -z  $NAME 
then
    echo "传参为空"
    exit 1
else
    echo $NAME
fi
ID=`ps -ef | grep "$NAME" | grep -v "grep" |grep -v "stop.sh" | awk '{print $2}'`
#ID=`ps -ef | grep jar | grep -v "grep" | awk '{print $2}'`
echo $ID
echo "---------------"
for id in $ID
do
#kill -9 $id
echo "killed $id"
done
echo "---------------"
